<?php
namespace app\validate;

use think\Validate;

class ProjectCollectionValidate extends Validate
{

    protected $rule = [
        'project_id'     => 'require',
        'user_id'        => 'require',
    ];
    
    protected $message           = [
        'project_id.require' => '项目ID有误',
        'user_id.require'    => '请先登录',
    ];
    
    protected $scene = [
        # 收藏
        'collection' => ['project_id', 'user_id'],

        # 点赞喜欢
        'like' => ['project_id', 'user_id'],
    ];
}